1. Technical Field of the Invention
The present invention relates to database maintenance, and more particularly, to the synchronization of client and server databases which are remotely located from each other.
2. Description of Related Art
The proliferation of networks, and in particular wide area networks, has led to the circumstance where multiple versions or copies of a same database may exist at two separate locations, for instance, at a server and at a client within the network. Differences between the entries made at a client and at a server within the same database requires periodic updating of each of the version of the database with respect to each other in order to insure that the same information is stored within each versions of the database. This process is referred to as synchronization and involves the transmission of information between each version of the of the database indicating the changes made since a last synchronization.
During the occurrence of a synchronization procedure between a client and server databases, each of the versions of the database must be locked to prevent user input to the database during the synchronization process. This is due to the fact that if a database is not locked during the synchronization procedure, there is a risk that modifications may be made during the synchronization process that will not be detected, and create discrepancies between the supposedly synchronized versions of the database. This, of course, limits access to a database and may prevent a user from performing desired operations if the user attempts to contact the database during a synchronization procedure. Thus, some manner for enabling continued updating of databases during a synchronization process of the database would be greatly desirable.
Furthermore, the synchronization process requires a number of messages to be transmitted back and forth between the client version of the database and the server version of the database. Some manner of minimizing or optimizing the number of messages transmitted between the databases would enable the process to be carried out in a faster manner. Thus, minimizing the amount of time for the synchronization process to utilize system resources. This can be very important in systems such as wireless transmission systems wherein radio link bandwidth is required to transmit synchronization messages between the databases.
The present invention overcomes the foregoing and other problems with a method and system for synchronizing a first database located within a client with a second database located within a server. Upon initiation of the synchronization process, the client transmits a first synchronization message to the second database at the server. The first synchronization message includes MAPITEM records from a previous synchronization process of the databases, UPDATES to be performed at the second database, a current synchronization time of the present synchronization process and a time for the last synchronization process.
Upon receipt of the first synchronization message at the server, the second database is updated responsive to the first synchronization message. The server transmits a second synchronization message to the client. The second synchronization message contains UPDATES to be performed at the client database, the RESULTS of the requested changes in the first synchronization message and the current synchronization time received within the first synchronization message. Responsive to the second synchronization message the client updates the first database responsive to any UPDATES within the second synchronization message and deletes the previously transmitted MAPITEM records so that the MAPITEM records for the present synchronization process may be stored for transmission during a next synchronization process.